package com.example.app.components.MyCheckBox

import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.CheckBox
import androidx.compose.material.icons.rounded.CheckBoxOutlineBlank
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import com.example.app.components.MyButton.MyIconButton
import com.example.app.components.MyIcon.MyIcon
import com.example.app.data.bean.routeAddAccount.AccountRelationPeople

data class MyCustomCheckBoxItem(
        var checked: Boolean,
        var relationPeople: AccountRelationPeople
)
@Composable
fun MyCustomCheckBox(
        checkHandler: (bool: Boolean) -> Unit = {},
        myCustomCheckBoxItem: MyCustomCheckBoxItem
) {
    if (myCustomCheckBoxItem.checked) {
        MyIconButton(onClick = {
            checkHandler(false)
        }) {
            MyIcon(imageVector = Icons.Rounded.CheckBox)
        }
    } else {
        MyIconButton(onClick = {
            checkHandler(true)
        }) {
            MyIcon(imageVector = Icons.Rounded.CheckBoxOutlineBlank)
        }
    }
}